package data;

public class Suffix extends Attribute {

	private Adjectif adjectif;
	private Gender gender;

	public Suffix(String ms, String bonus, Gender g) {
		super(ms, ms, ms, ms, bonus);
		setGender(g);
		adjectif = new Adjectif("", "", "", "", "");
	}
	
	public Suffix(String ms, Gender g) {
		super(ms, ms, ms, ms, "osef");
		setGender(g);
		adjectif = new Adjectif("", "", "", "", "");
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Suffix) {
			Suffix s = (Suffix) obj;
			for (int i = 0; i < 4; i++) {
				if (!s.names[i].equals(names[i])) {
					return false;
				}
			}
			return true;
		}
		return false;
	}

	public Suffix(String ms, String bonus, Gender g, Adjectif a) {
		super(ms, ms, ms, ms, bonus);
		setGender(g);
		setAdjectif(a);
	}

	@Override
	public String getName(Gender g) {
		return names[g.ordinal()];
	}

	@Override
	public String getPrice() {
		return price;
	}

	public Adjectif getAdjectif() {
		return adjectif;
	}

	public void setAdjectif(Adjectif adjectif) {
		this.adjectif = adjectif;
	}

	public Gender getGender() {
		return gender;
	}

	public void setGender(Gender gender) {
		this.gender = gender;
	}

}
